package com.admin.scroller.photoorvideo.utils;

public class TimeUtil {
    public static String formatime(long time){
        time=time/1000;
        if(time<10){
            return "00:0"+time;
        }else if(time<60){
            return "00:"+time;
        }else {
            long t=time/60;
            long s=time-t*60;
            if(t<10){
                return "0"+t+":"+(s<10?"0"+s:s);
            }else if(t<60){
                return t+":"+(s<10?"0"+s:s);
            }else {
                long h=t/60;
                long f=t-h*60;
                return h+":"+(f<10?"0"+f:f)+":"+(s<10?"0"+s:s);
            }
        }
    }
}
